home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML Instance.sea / XML Instance / Required / ccs_util.jar / test / framework / TestFailure.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-12-09  |  1.2 KB  |  26 lines

  1. package test.framework;
  2.  
  3. public class TestFailure {
  4.    protected Test fFailedTest;
  5.    protected Throwable fThrownException;
  6.  
  7.    public TestFailure(Test failedTest, Throwable thrownException) {
  8.       this.fFailedTest = failedTest;
  9.       this.fThrownException = thrownException;
  10.    }
  11.  
  12.    public Test failedTest() {
  13.       return this.fFailedTest;
  14.    }
  15.  
  16.    public Throwable thrownException() {
  17.       return this.fThrownException;
  18.    }
  19.  
  20.    public String toString() {
  21.       StringBuffer buffer = new StringBuffer();
  22.       buffer.append(this.fFailedTest + ": " + this.fThrownException.getMessage());
  23.       return buffer.toString();
  24.    }
  25. }
  26.